package com.sali.b_design_pattern.l_prototype_pattern.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @description:
 * @author: zhang hang
 * @date: 2023/3/18 21:31.
 * @version: 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class PrototypeVersion1 implements Cloneable {

    private String name;

    /**
     * description: 它也要实现cloneable接口！
     **/
    private Addresss addresss;

    @Override
    public Object clone() throws CloneNotSupportedException {
        PrototypeVersion1 prototypeVersion1 = (PrototypeVersion1) super.clone();
        return prototypeVersion1;
    }


}
